/**
 * Created by waltyuqing on 16/9/20.
 */
var DBPool=require('../util/DBHelper-pool');

module.exports={
   address:function(am,callback) {//index 表示第几页 acount表示一页显示几条

        DBPool.getConnection(function (client) {
//调用视图
            client.query("insert into address (u_telephone,user_name,sex,province,city ,area ,address_detail,telephone) values(?,?,?,?,?,?,?,?) ",[am.u_t,am.user_name,am.sex,am.prov,am.city,am.area,am.address_detail,am.telephone],function (error,result) {
                if(error){
                    console.log(error.message);
                    return;
                }

                console.log('qqqq'+JSON.stringify(result))
                callback({res:result.affectedRows});


            });

            client.release();


        });

    }

}